<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
	"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>PHP Cheat Sheet</title>
</head>
<body>

<div class="phpfr-content">
	<h1>
		PHP Cheat Sheet
	</h1>
	
	<ul class="phpfr-nav">
		<li><span class="link" id="link-regular-expressions" onclick="PHPFR.ui.showTab('regular-expressions');">Regular Expressions</span></li>
		<li><span class="link" id="link-server"              onclick="PHPFR.ui.showTab('server');">$_SERVER</span></li>
		<li><span class="link" id="link-constants"           onclick="PHPFR.ui.showTab('constants');">Constants</span></li>
		<li><span class="link" id="link-fopen-modes"         onclick="PHPFR.ui.showTab('fopen-modes');">fopen() Modes</span></li>
		<li><span class="link" id="link-comparisons"         onclick="PHPFR.ui.showTab('comparisons');">Comparisons</span></li>
	</ul>
	
	<hr>

	<!-- BEGIN: REGULAR EXPRESSIONS -->
	<div class="phpfr-section" id="regular-expressions">
		<table>
			<caption>Regular Expression Examples</caption>
			<thead>
				<tr>
					<th>Example</th>
					<th>Description</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>[a-g]</td>
					<td>match any lowercase letter from a through g</td>
				</tr>
				<tr>
					<td>[0-9]</td>
					<td>match any digit (0 through 9), equivalent to \d</td>
				</tr>
				<tr>
					<td>[^A-Z]</td>
					<td>match no letters from A through Z</td>
				</tr>
				<tr>
					<td>(foo|bar)</td>
					<td>match either "foo" or "bar"</td>
				</tr>
				<tr>
					<td>
						(?(condition)yes-pattern)<br>
						(?(condition)yes-pattern|no-pattern)
					</td>
					<td>If the condition is satisfied, the yes-pattern is used; otherwise the no-pattern (if present) is used.</td>
				</tr>
			</tbody>
		</table>
		<p>Find practical examples of regular expressions at <span class="link" onclick="PHPFR.util.gotoURL('http://www.regular-expressions.info/examples.html');">Regular-Expressions.info</span></p>
		<table>
			<caption>Basic Syntax</caption>
			<thead>
				<tr>
					<th>Character</th>
					<th>Description</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>\</td>
					<td>general escape cahracter with serveral uses</td>
				</tr>
				<tr>
					<td>^</td>
					<td>assert start of subject (or line, in multiline mode) or negate the class if the first character in a character class</td>
				</tr>
				<tr>
					<td>$</td>
					<td>assert end of subject (or line, in multiline mode)</td>
				</tr>
				<tr>
					<td>.</td>
					<td>match any character except newline (by default)</td>
				</tr>
				<tr>
					<td>[</td>
					<td>start character class definition</td>
				</tr>
				<tr>
					<td>]</td>
					<td>end character class definition</td>
				</tr>
				<tr>
					<td>|</td>
					<td>start of alternative branch</td>
				</tr>
				<tr>
					<td>(</td>
					<td>start subpatter</td>
				</tr>
				<tr>
					<td>)</td>
					<td>end subpattern</td>
				</tr>
				<tr>
					<td>?</td>
					<td>extends the meaning of (also 0 or 1 quantifier, equivalent to {0,1}, also quantifier minimizer)</td>
				</tr>
				<tr>
					<td>*</td>
					<td>0 or more quantifier, equivalent to {0,}</td>
				</tr>
				<tr>
					<td>+</td>
					<td>1 or more quantifier, equivalent to {1,}</td>
				</tr>
				<tr>
					<td>{</td>
					<td>start min/max quantifier</td>
				</tr>
				<tr>
					<td>}</td>
					<td>end min/max quantifier</td>
				</tr>
				<tr>
					<td>-</td>
					<td>indicates character range in a character class</td>
				</tr>
				<tr>
					<td>\a</td>
					<td>alarm, that is, the BEL character (hex 07)</td>
				</tr>
				<tr>
					<td>\cx</td>
					<td>"control-x", where x is any character</td>
				</tr>
				<tr>
					<td>\e</td>
					<td>escape (hex 1B)</td>
				</tr>
				<tr>
					<td>\f</td>
					<td>formfeed (hex 0C)</td>
				</tr>
				<tr>
					<td>\n</td>
					<td>newline (hex 0A)</td>
				</tr>
				<tr>
					<td>\r</td>
					<td>carriage return (hex 0D)</td>
				</tr>
				<tr>
					<td>\t</td>
					<td>tab (hex 09)</td>
				</tr>
				<tr>
					<td>\xhh</td>
					<td>character with hex code hh</td>
				</tr>
				<tr>
					<td>\ddd</td>
					<td>character with octal code ddd, or backreference</td>
				</tr>
				<tr>
					<td>\040</td>
					<td>is another way of writing a space</td>
				</tr>
				<tr>
					<td>\40</td>
					<td>is the same, provided there are fewer than 40 previous capturing subpatterns</td>
				</tr>
				<tr>
					<td>\7</td>
					<td>is always a back reference</td>
				</tr>
				<tr>
					<td>\11</td>
					<td>might be a back reference, or another way of writing a tab</td>
				</tr>
				<tr>
					<td>\011</td>
					<td>is always a tab</td>
				</tr>
				<tr>
					<td>\0113</td>
					<td>is a tab followed by the character "3"</td>
				</tr>
				<tr>
					<td>\113</td>
					<td>is the character with octal code 113 (since there can be no more than 99 back references)</td>
				</tr>
				<tr>
					<td>\377</td>
					<td>is a byte consisting entirely of 1 bits</td>
				</tr>
				<tr>
					<td>\81</td>
					<td>is either a back reference, or a binary zero followed by the two characters "8" and "1"</td>
				</tr>
				<tr>
					<td>\d</td>
					<td>any decimal digit</td>
				</tr>
				<tr>
					<td>\D</td>
					<td>any character that is not a decimal digit</td>
				</tr>
				<tr>
					<td>\h</td>
					<td>any horizontal whitespace character (since PHP 5.2.4)</td>
				</tr>
				<tr>
					<td>\H</td>
					<td>any character that is not a horizontal whitespace character (since PHP 5.2.4)</td>
				</tr>
				<tr>
					<td>\s</td>
					<td>any whitespace character</td>
				</tr>
				<tr>
					<td>\S</td>
					<td>any character that is not a whitespace character</td>
				</tr>
				<tr>
					<td>\v</td>
					<td>any vertical whitespace character (since PHP 5.2.4)</td>
				</tr>
				<tr>
					<td>\V</td>
					<td>any character that is not a vertical whitespace character (since PHP 5.2.4)</td>
				</tr>
				<tr>
					<td>\w</td>
					<td>any "word" character</td>
				</tr>
				<tr>
					<td>\W</td>
					<td>any "non-word" character</td>
				</tr>
				<tr>
					<td>\b</td>
					<td>word boundary</td>
				</tr>
				<tr>
					<td>\B</td>
					<td>not a word boundary</td>
				</tr>
				<tr>
					<td>\A</td>
					<td>start of a subject (independent of multiline mode)</td>
				</tr>
				<tr>
					<td>\Z</td>
					<td>end of subject or newline at end (independent of multiline mode)</td>
				</tr>
				<tr>
					<td>\z</td>
					<td>end of subject (independent of multiline mode)</td>
				</tr>
				<tr>
					<td>\G</td>
					<td>first matching position in subject</td>
				</tr>
				<tr>
					<td>\p{xx}</td>
					<td>a character with xx property</td>
				</tr>
				<tr>
					<td>\P{xx}</td>
					<td>a character without the xx property</td>
				</tr>
				<tr>
					<td>\X</td>
					<td>an extended Unicode sequence</td>
				</tr>
				<tr>
					<td>(?i)</td>
					<td>for PCRE_CASELESS</td>
				</tr>
				<tr>
					<td>(?m)</td>
					<td>for PCRE_MULTILINE</td>
				</tr>
				<tr>
					<td>(?s)</td>
					<td>for PCRE_DOTALL</td>
				</tr>
				<tr>
					<td>(?x)</td>
					<td>for PCRE_EXTENDED</td>
				</tr>
				<tr>
					<td>(?U)</td>
					<td>for PCRE_UNGREEDY</td>
				</tr>
				<tr>
					<td>(?X)</td>
					<td>for PCRE_EXTRA</td>
				</tr>
			</tbody>
		</table>
		<table>
			<caption>PCRE Modifiers</caption>
			<thead>
				<tr>
					<th>Modifier</th>
					<th>Description</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>i (PCRE_CASELESS)</td>
					<td>If this modifier is set, letters in the pattern match both upper and lower case letters.</td>
				</tr>
				<tr>
					<td>m (PCRE_MULTILINE)</td>
					<td>By default, PCRE treats the subject string as consisting of a single "line" of characters (even if it actually contains several newlines). The "start of line" metacharacter (^) matches only at the start of the string, while the "end of line" metacharacter ($) matches only at the end of the string, or before a terminating newline (unless D modifier is set). This is the same as Perl.   When this modifier is set, the "start of line" and "end of line" constructs match immediately following or immediately before any newline in the subject string, respectively, as well as at the very start and end. This is equivalent to Perl's /m modifier. If there are no "\n" characters in a subject string, or no occurrences of ^ or $ in a pattern, setting this modifier has no effect.</td>
				</tr>
				<tr>
					<td>s (PCRE_DOTALL)</td>
					<td>If this modifier is set, a dot metacharacter in the pattern matches all characters, including newlines. Without it, newlines are excluded. This modifier is equivalent to Perl's /s modifier. A negative class such as [^a] always matches a newline character, independent of the setting of this modifier.</td>
				</tr>
				<tr>
					<td>x (PCRE_EXTENDED)</td>
					<td>If this modifier is set, whitespace data characters in the pattern are totally ignored except when escaped or inside a character class, and characters between an unescaped # outside a character class and the next newline character, inclusive, are also ignored. This is equivalent to Perl's /x modifier, and makes it possible to include comments inside complicated patterns. Note, however, that this applies only to data characters. Whitespace characters may never appear within special character sequences in a pattern, for example within the sequence (?( which introduces a conditional subpattern.</td>
				</tr>
				<tr>
					<td>e (PREG_REPLACE_EVAL)</td>
					<td>If this modifier is set, preg_replace() does normal substitution of backreferences in the replacement string, evaluates it as PHP code, and uses the result for replacing the search string. Single quotes, double quotes, backslashes and NULL chars will be escaped by backslashes in substituted backreferences. Only preg_replace() uses this modifier; it is ignored by other PCRE functions. Note: This modifier was not available in PHP 3.</td>
				</tr>
				<tr>
					<td>A (PCRE_ANCHORED)</td>
					<td>If this modifier is set, the pattern is forced to be "anchored", that is, it is constrained to match only at the start of the string which is being searched (the "subject string"). This effect can also be achieved by appropriate constructs in the pattern itself, which is the only way to do it in Perl.</td>
				</tr>
				<tr>
					<td>D&nbsp;(PCRE_DOLLAR_ENDONLY)</td>
					<td>If this modifier is set, a dollar metacharacter in the pattern matches only at the end of the subject string. Without this modifier, a dollar also matches immediately before the final character if it is a newline (but not before any other newlines). This modifier is ignored if m modifier is set. There is no equivalent to this modifier in Perl.</td>
				</tr>
				<tr>
					<td>S</td>
					<td>When a pattern is going to be used several times, it is worth spending more time analyzing it in order to speed up the time taken for matching. If this modifier is set, then this extra analysis is performed. At present, studying a pattern is useful only for non-anchored patterns that do not have a single fixed starting character.</td>
				</tr>
				<tr>
					<td>U (PCRE_UNGREEDY)</td>
					<td>This modifier inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by "?". It is not compatible with Perl. It can also be set by a (?U) modifier setting within the pattern or by a question mark behind a quantifier (e.g. .*?).</td>
				</tr>
				<tr>
					<td>X (PCRE_EXTRA)</td>
					<td>This modifier turns on additional functionality of PCRE that is incompatible with Perl. Any backslash in a pattern that is followed by a letter that has no special meaning causes an error, thus reserving these combinations for future expansion. By default, as in Perl, a backslash followed by a letter with no special meaning is treated as a literal. There are at present no other features controlled by this modifier.</td>
				</tr>
				<tr>
					<td>u (PCRE_UTF8)</td>
					<td>This modifier turns on additional functionality of PCRE that is incompatible with Perl. Pattern strings are treated as UTF-8. This modifier is available from PHP 4.1.0 or greater on Unix and from PHP 4.2.3 on win32. UTF-8 validity of the pattern is checked since PHP 4.3.5.</td>
				</tr>
			</tbody>
		</table>
		<table>
			<caption>PREG Constants</caption>
			<thead>
				<tr>
					<th>Constant</th>
					<th>Description</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>PREG_PATTERN_ORDER</td>
					<td>Orders results so that $matches[0] is an array of full pattern matches, $matches[1] is an array of strings matched by the first parenthesized subpattern, and so on. This flag is only used with preg_match_all().</td>
				</tr>
				<tr>
					<td>PREG_SET_ORDER</td>
					<td>Orders results so that $matches[0] is an array of first set of matches, $matches[1] is an array of second set of matches, and so on. This flag is only used with preg_match_all().</td>
				</tr>
				<tr>
					<td>PREG_OFFSET_CAPTURE</td>
					<td>See the description of PREG_SPLIT_OFFSET_CAPTURE. This flag is available since PHP 4.3.0.</td>
				</tr>
				<tr>
					<td>PREG_SPLIT_NO_EMPTY</td>
					<td>This flag tells preg_split() to return only non-empty pieces.</td>
				</tr>
				<tr>
					<td>PREG_SPLIT_DELIM_CAPTURE</td>
					<td>This flag tells preg_split() to capture parenthesized expression in the delimiter pattern as well. This flag is available since PHP 4.0.5.</td>
				</tr>
				<tr>
					<td>PREG_SPLIT_OFFSET_CAPTURE</td>
					<td>If this flag is set, for every occurring match the appendant string offset will also be returned. Note that this changes the return values in an array where every element is an array consisting of the matched string at offset 0 and its string offset within subject at offset 1. This flag is available since PHP 4.3.0 and is only used for preg_split().</td>
				</tr>
				<tr>
					<td>PREG_NO_ERROR</td>
					<td>Returned by preg_last_error() if there were no errors. Available since PHP 5.2.0.</td>
				</tr>
				<tr>
					<td>PREG_INTERNAL_ERROR</td>
					<td>Returned by preg_last_error() if there was an internal PCRE error. Available since PHP 5.2.0.</td>
				</tr>
				<tr>
					<td>PREG_BACKTRACK_LIMIT_ERROR</td>
					<td>Returned by preg_last_error() if backtrack limit was exhausted. Available since PHP 5.2.0.</td>
				</tr>
				<tr>
					<td>PREG_RECURSION_LIMIT_ERROR</td>
					<td>Returned by preg_last_error() if recursion limit was exhausted. Available since PHP 5.2.0.</td>
				</tr>
				<tr>
					<td>PREG_BAD_UTF8_ERROR</td>
					<td>Returned by preg_last_error() if the last error was caused by malformed UTF-8 data (only when running a regex in UTF-8 mode). Available since PHP 5.2.0.</td>
				</tr>
				<tr>
					<td>PCRE_VERSION</td>
					<td>PCRE version and release date (e.g. "7.0 18-Dec-2006"). Available since PHP 5.2.4.</td>
				</tr>
			</tbody>
		</table>
	</div>
	<!-- END: REGULAR EXPRESSIONS -->
	
	<!-- BEGIN: $_SERVER VARIABLES -->
	<div class="phpfr-section" id="server">
		<table>
			<caption>$_SERVER Variables</caption>
			<thead>
				<tr>
					<th>Variable</th>
					<th>Description</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>'PHP_SELF'</td>
					<td>The filename of the currently executing script, relative to the document root. For instance, $_SERVER['PHP_SELF'] in a script at the address http://example.com/test.php/foo.bar would be /test.php/foo.bar. The __FILE__ constant contains the full path and filename of the current (i.e. included) file. If PHP is running as a command-line processor this variable contains the script name since PHP 4.3.0. Previously it was not available.</td>
				</tr>
				<tr>
					<td>'argv'</td>
					<td>Array of arguments passed to the script. When the script is run on the command line, this gives C-style access to the command line parameters. When called via the GET method, this will contain the query string.</td>
				</tr>
				<tr>
					<td>'argc'</td>
					<td>Contains the number of command line parameters passed to the script (if run on the command line).</td>
				</tr>
				<tr>
					<td>'GATEWAY_INTERFACE'</td>
					<td>What revision of the CGI specification the server is using; i.e. 'CGI/1.1'.</td>
				</tr>
				<tr>
					<td>'SERVER_ADDR'</td>
					<td>The IP address of the server under which the current script is executing.</td>
				</tr>
				<tr>
					<td>'SERVER_NAME'</td>
					<td>The name of the server host under which the current script is executing. If the script is running on a virtual host, this will be the value defined for that virtual host.</td>
				</tr>
				<tr>
					<td>'SERVER_SOFTWARE'</td>
					<td>Server identification string, given in the headers when responding to requests.</td>
				</tr>
				<tr>
					<td>'SERVER_PROTOCOL'</td>
					<td>Name and revision of the information protocol via which the page was requested; i.e. 'HTTP/1.0';</td>
				</tr>
				<tr>
					<td>'REQUEST_METHOD'</td>
					<td>Which request method was used to access the page; i.e. 'GET', 'HEAD', 'POST', 'PUT'.</td>
				</tr>
				<tr>
					<td>'REQUEST_TIME'</td>
					<td>The timestamp of the start of the request. Available since PHP 5.1.0.</td>
				</tr>
				<tr>
					<td>'QUERY_STRING'</td>
					<td>The query string, if any, via which the page was accessed.</td>
				</tr>
				<tr>
					<td>'DOCUMENT_ROOT'</td>
					<td>The document root directory under which the current script is executing, as defined in the server's configuration file.</td>
				</tr>
				<tr>
					<td>'HTTP_ACCEPT'</td>
					<td>Contents of the Accept: header from the current request, if there is one.</td>
				</tr>
				<tr>
					<td>'HTTP_ACCEPT_CHARSET'</td>
					<td>Contents of the Accept-Charset: header from the current request, if there is one. Example: 'iso-8859-1,*,utf-8'.</td>
				</tr>
				<tr>
					<td>'HTTP_ACCEPT_ENCODING'</td>
					<td>Contents of the Accept-Encoding: header from the current request, if there is one. Example: 'gzip'.</td>
				</tr>
				<tr>
					<td>'HTTP_ACCEPT_LANGUAGE'</td>
					<td>Contents of the Accept-Language: header from the current request, if there is one. Example: 'en'.</td>
				</tr>
				<tr>
					<td>'HTTP_CONNECTION'</td>
					<td>Contents of the Connection: header from the current request, if there is one. Example: 'Keep-Alive'.</td>
				</tr>
				<tr>
					<td>'HTTP_HOST'</td>
					<td>Contents of the Host: header from the current request, if there is one.</td>
				</tr>
				<tr>
					<td>'HTTP_REFERER'</td>
					<td>The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.</td>
				</tr>
				<tr>
					<td>'HTTP_USER_AGENT'</td>
					<td>Contents of the User-Agent: header from the current request, if there is one. This is a string denoting the user agent being which is accessing the page. A typical example is: Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586). Among other things, you can use this value with <span class="link" onclick="PHPFR.functions.show('get_browser');">get_browser()</span> to tailor your page's output to the capabilities of the user agent.</td>
				</tr>
				<tr>
					<td>'HTTPS'</td>
					<td>Set to a non-empty value if the script was queried through the HTTPS protocol.   Note that when using ISAPI with IIS, the value will be off if the request was not made through the HTTPS protocol.</td>
				</tr>
				<tr>
					<td>'REMOTE_ADDR'</td>
					<td>The IP address from which the user is viewing the current page.</td>
				</tr>
				<tr>
					<td>'REMOTE_HOST'</td>
					<td>The Host name from which the user is viewing the current page. The reverse dns lookup is based off the REMOTE_ADDR of the user.</td>
				</tr>
				<tr>
					<td>'REMOTE_PORT'</td>
					<td>The port being used on the user's machine to communicate with the web server.</td>
				</tr>
				<tr>
					<td>'SCRIPT_FILENAME'</td>
					<td>The absolute pathname of the currently executing script.</td>
				</tr>
				<tr>
					<td>'SERVER_ADMIN'</td>
					<td>The value given to the SERVER_ADMIN (for Apache) directive in the web server configuration file. If the script is running on a virtual host, this will be the value defined for that virtual host.</td>
				</tr>
				<tr>
					<td>'SERVER_PORT'</td>
					<td>The port on the server machine being used by the web server for communication. For default setups, this will be '80'; using SSL, for instance, will change this to whatever your defined secure HTTP port is.</td>
				</tr>
				<tr>
					<td>'SERVER_SIGNATURE'</td>
					<td>String containing the server version and virtual host name which are added to server-generated pages, if enabled.</td>
				</tr>
				<tr>
					<td>'PATH_TRANSLATED'</td>
					<td>Filesystem- (not document root-) based path to the current script, after the server has done any virtual-to-real mapping.</td>
				</tr>
				<tr>
					<td>'SCRIPT_NAME'</td>
					<td>Contains the current script's path. This is useful for pages which need to point to themselves. The <span class="link" onclick="PHPFR.ui.showTab('constants');">__FILE__</span> constant contains the full path and filename of the current (i.e. included) file.</td>
				</tr>
				<tr>
					<td>'REQUEST_URI'</td>
					<td>The URI which was given in order to access this page; for instance, '/index.html'.</td>
				</tr>
				<tr>
					<td>'PHP_AUTH_DIGEST'</td>
					<td>When running under Apache as module doing Digest HTTP authentication this variable is set to the 'Authorization' header sent by the client (which you should then use to make the appropriate validation).</td>
				</tr>
				<tr>
					<td>'PHP_AUTH_USER'</td>
					<td>When running under Apache or IIS (ISAPI on PHP 5) as module doing HTTP authentication this variable is set to the username provided by the user.</td>
				</tr>
				<tr>
					<td>'PHP_AUTH_PW'</td>
					<td>When running under Apache or IIS (ISAPI on PHP 5) as module doing HTTP authentication this variable is set to the password provided by the user.</td>
				</tr>
				<tr>
					<td>'AUTH_TYPE'</td>
					<td>When running under Apache as module doing HTTP authenticated this variable is set to the authentication type.</td>
				</tr>
			</tbody>
		</table>
	</div>
	<!-- END: $_SERVER VARIABLES -->
	
	<!-- BEGIN: FOPEN MODES -->
	<div class="phpfr-section" id="fopen-modes">
		<table>
			<caption>fopen() Modes</caption>
			<thead>
				<tr>
					<th>Mode</th>
					<th>Description</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>r</td>
					<td>Open for reading only; place the file pointer at the beginning of the file.</td>
				</tr>
				<tr>
					<td>r+</td>
					<td>Open for reading and writing; place the file pointer at the beginning of the file.</td>
				</tr>
				<tr>
					<td>w</td>
					<td>Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.</td>
				</tr>
				<tr>
					<td>w+</td>
					<td>Open for reading and writing; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.</td>
				</tr>
				<tr>
					<td>a</td>
					<td>Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it.</td>
				</tr>
				<tr>
					<td>a+</td>
					<td>Open for reading and writing; place the file pointer at the end of the file. If the file does not exist, attempt to create it.</td>
				</tr>
				<tr>
					<td>x</td>
					<td>Create and open for writing only; place the file pointer at the beginning of the file. If the file already exists, the <span class="link" onclick="PHPFR.functions.show('fopen');">fopen()</span> call will fail by returning FALSE and generating an error of level E_WARNING. If the file does not exist, attempt to create it. This is equivalent to specifying O_EXCL|O_CREAT flags for the underlying open(2) system call. This option is supported in PHP 4.3.2 and later, and only works for local files.</td>
				</tr>
				<tr>
					<td>x+</td>
					<td>Create and open for reading and writing; place the file pointer at the beginning of the file. If the file already exists, the <span class="link" onclick="PHPFR.functions.show('fopen');">fopen()</span> call will fail by returning FALSE and generating an error of level E_WARNING. If the file does not exist, attempt to create it. This is equivalent to specifying O_EXCL|O_CREAT flags for the underlying open(2) system call. This option is supported in PHP 4.3.2 and later, and only works for local files.</td>
				</tr>
			</tbody>
		</table>
	</div>
	<!-- END: FOPEN MODES -->
	
	<!-- BEGIN: CONSTANTS -->
	<div class="phpfr-section" id="constants">
		<table>
			<caption>Magic Constants</caption>
			<thead>
				<tr>
					<th>Constant</th>
					<th>Description</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>__LINE__</td>
					<td>The current line number of the file.</td>
				</tr>
				<tr>
					<td>__FILE__</td>
					<td>The full path and filename of the file. If used inside an include, the name of the included file is returned. Since PHP 4.0.2, __FILE__ always contains an absolute path whereas in older versions it contained relative path under some circumstances.</td>
				</tr>
				<tr>
					<td>__FUNCTION__</td>
					<td>The function name. (Added in PHP 4.3.0) As of PHP 5 this constant returns the function name as it was declared (case-sensitive). In PHP 4 its value is always lowercased.</td>
				</tr>
				<tr>
					<td>__CLASS__</td>
					<td>The class name. (Added in PHP 4.3.0) As of PHP 5 this constant returns the class name as it was declared (case-sensitive). In PHP 4 its value is always lowercased.</td>
				</tr>
				<tr>
					<td>__METHOD__</td>
					<td>The class method name. (Added in PHP 5.0.0) The method name is returned as it was declared (case-sensitive).</td>
				</tr>
			</tbody>
		</table>
		<table>
			<caption>Core Predefined Constants</caption>
			<thead>
				<tr>
					<th>Constant</th>
					<th>Description</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>PHP_VERSION (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_OS (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_SAPI (string)</td>
					<td>Available since PHP 4.2.0. See also php_sapi_name().</td>
				</tr>
				<tr>
					<td>PHP_EOL (string)</td>
					<td>Available since PHP 4.3.10 and PHP 5.0.2</td>
				</tr>
				<tr>
					<td>PHP_INT_MAX (integer)</td>
					<td>Available since PHP 4.4.0 and PHP 5.0.5</td>
				</tr>
				<tr>
					<td>PHP_INT_SIZE (integer)</td>
					<td>Available since PHP 4.4.0 and PHP 5.0.5</td>
				</tr>
				<tr>
					<td>DEFAULT_INCLUDE_PATH (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PEAR_INSTALL_DIR (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PEAR_EXTENSION_DIR (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_EXTENSION_DIR (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_PREFIX (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_BINDIR (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_LIBDIR (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_DATADIR (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_SYSCONFDIR (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_LOCALSTATEDIR (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_CONFIG_FILE_PATH (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_CONFIG_FILE_SCAN_DIR (string)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_SHLIB_SUFFIX (string)</td>
					<td>Available since PHP 4.3.0</td>
				</tr>
				<tr>
					<td>PHP_OUTPUT_HANDLER_START (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_OUTPUT_HANDLER_CONT (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>PHP_OUTPUT_HANDLER_END (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_ERROR (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_WARNING (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_PARSE (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_NOTICE (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_CORE_ERROR (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_CORE_WARNING (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_COMPILE_ERROR (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_COMPILE_WARNING (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_USER_ERROR (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_USER_WARNING (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_USER_NOTICE (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_ALL (integer)</td>
					<td></td>
				</tr>
				<tr>
					<td>E_STRICT  (integer)</td>
					<td>Available since PHP 5.0.0</td>
				</tr>
				<tr>
					<td>__COMPILER_HALT_OFFSET__  (integer)</td>
					<td>Available since PHP 5.1.0</td>
				</tr>
			</tbody>
		</table>
		<table>
			<caption>Standard Predefined Constants</caption>
			<thead>
				<tr>
					<th>Constant</th>
				</tr>
			</thead>
			<tbody>
				<tr><td>EXTR_OVERWRITE (integer)</td></tr>
				<tr><td>EXTR_SKIP (integer)</td></tr>
				<tr><td>EXTR_PREFIX_SAME (integer)</td></tr>
				<tr><td>EXTR_PREFIX_ALL (integer)</td></tr>
				<tr><td>EXTR_PREFIX_INVALID (integer)</td></tr>
				<tr><td>EXTR_PREFIX_IF_EXISTS (integer)</td></tr>
				<tr><td>EXTR_IF_EXISTS (integer)</td></tr>
				<tr><td>SORT_ASC (integer)</td></tr>
				<tr><td>SORT_DESC (integer)</td></tr>
				<tr><td>SORT_REGULAR (integer)</td></tr>
				<tr><td>SORT_NUMERIC (integer)</td></tr>
				<tr><td>SORT_STRING (integer)</td></tr>
				<tr><td>CASE_LOWER (integer)</td></tr>
				<tr><td>CASE_UPPER (integer)</td></tr>
				<tr><td>COUNT_NORMAL (integer)</td></tr>
				<tr><td>COUNT_RECURSIVE (integer)</td></tr>
				<tr><td>ASSERT_ACTIVE (integer)</td></tr>
				<tr><td>ASSERT_CALLBACK (integer)</td></tr>
				<tr><td>ASSERT_BAIL (integer)</td></tr>
				<tr><td>ASSERT_WARNING (integer)</td></tr>
				<tr><td>ASSERT_QUIET_EVAL (integer)</td></tr>
				<tr><td>CONNECTION_ABORTED (integer)</td></tr>
				<tr><td>CONNECTION_NORMAL (integer)</td></tr>
				<tr><td>CONNECTION_TIMEOUT (integer)</td></tr>
				<tr><td>INI_USER (integer)</td></tr>
				<tr><td>INI_PERDIR (integer)</td></tr>
				<tr><td>INI_SYSTEM (integer)</td></tr>
				<tr><td>INI_ALL (integer)</td></tr>
				<tr><td>M_E (float)</td></tr>
				<tr><td>M_LOG2E (float)</td></tr>
				<tr><td>M_LOG10E (float)</td></tr>
				<tr><td>M_LN2 (float)</td></tr>
				<tr><td>M_LN10 (float)</td></tr>
				<tr><td>M_PI (float)</td></tr>
				<tr><td>M_PI_2 (float)</td></tr>
				<tr><td>M_PI_4 (float)</td></tr>
				<tr><td>M_1_PI (float)</td></tr>
				<tr><td>M_2_PI (float)</td></tr>
				<tr><td>M_2_SQRTPI (float)</td></tr>
				<tr><td>M_SQRT2 (float)</td></tr>
				<tr><td>M_SQRT1_2 (float)</td></tr>
				<tr><td>CRYPT_SALT_LENGTH (integer)</td></tr>
				<tr><td>CRYPT_STD_DES (integer)</td></tr>
				<tr><td>CRYPT_EXT_DES (integer)</td></tr>
				<tr><td>CRYPT_MD5 (integer)</td></tr>
				<tr><td>CRYPT_BLOWFISH (integer)</td></tr>
				<tr><td>DIRECTORY_SEPARATOR (string)</td></tr>
				<tr><td>SEEK_SET (integer)</td></tr>
				<tr><td>SEEK_CUR (integer)</td></tr>
				<tr><td>SEEK_END (integer)</td></tr>
				<tr><td>LOCK_SH (integer)</td></tr>
				<tr><td>LOCK_EX (integer)</td></tr>
				<tr><td>LOCK_UN (integer)</td></tr>
				<tr><td>LOCK_NB (integer)</td></tr>
				<tr><td>HTML_SPECIALCHARS (integer)</td></tr>
				<tr><td>HTML_ENTITIES (integer)</td></tr>
				<tr><td>ENT_COMPAT (integer)</td></tr>
				<tr><td>ENT_QUOTES (integer)</td></tr>
				<tr><td>ENT_NOQUOTES (integer)</td></tr>
				<tr><td>INFO_GENERAL (integer)</td></tr>
				<tr><td>INFO_CREDITS (integer)</td></tr>
				<tr><td>INFO_CONFIGURATION (integer)</td></tr>
				<tr><td>INFO_MODULES (integer)</td></tr>
				<tr><td>INFO_ENVIRONMENT (integer)</td></tr>
				<tr><td>INFO_VARIABLES (integer)</td></tr>
				<tr><td>INFO_LICENSE (integer)</td></tr>
				<tr><td>INFO_ALL (integer)</td></tr>
				<tr><td>CREDITS_GROUP (integer)</td></tr>
				<tr><td>CREDITS_GENERAL (integer)</td></tr>
				<tr><td>CREDITS_SAPI (integer)</td></tr>
				<tr><td>CREDITS_MODULES (integer)</td></tr>
				<tr><td>CREDITS_DOCS (integer)</td></tr>
				<tr><td>CREDITS_FULLPAGE (integer)</td></tr>
				<tr><td>CREDITS_QA (integer)</td></tr>
				<tr><td>CREDITS_ALL (integer)</td></tr>
				<tr><td>STR_PAD_LEFT (integer)</td></tr>
				<tr><td>STR_PAD_RIGHT (integer)</td></tr>
				<tr><td>STR_PAD_BOTH (integer)</td></tr>
				<tr><td>PATHINFO_DIRNAME (integer)</td></tr>
				<tr><td>PATHINFO_BASENAME (integer)</td></tr>
				<tr><td>PATHINFO_EXTENSION (integer)</td></tr>
				<tr><td>PATH_SEPARATOR (string)</td></tr>
				<tr><td>CHAR_MAX (integer)</td></tr>
				<tr><td>LC_CTYPE (integer)</td></tr>
				<tr><td>LC_NUMERIC (integer)</td></tr>
				<tr><td>LC_TIME (integer)</td></tr>
				<tr><td>LC_COLLATE (integer)</td></tr>
				<tr><td>LC_MONETARY (integer)</td></tr>
				<tr><td>LC_ALL (integer)</td></tr>
				<tr><td>LC_MESSAGES (integer)</td></tr>
				<tr><td>ABDAY_1 (integer)</td></tr>
				<tr><td>ABDAY_2 (integer)</td></tr>
				<tr><td>ABDAY_3 (integer)</td></tr>
				<tr><td>ABDAY_4 (integer)</td></tr>
				<tr><td>ABDAY_5 (integer)</td></tr>
				<tr><td>ABDAY_6 (integer)</td></tr>
				<tr><td>ABDAY_7 (integer)</td></tr>
				<tr><td>DAY_1 (integer)</td></tr>
				<tr><td>DAY_2 (integer)</td></tr>
				<tr><td>DAY_3 (integer)</td></tr>
				<tr><td>DAY_4 (integer)</td></tr>
				<tr><td>DAY_5 (integer)</td></tr>
				<tr><td>DAY_6 (integer)</td></tr>
				<tr><td>DAY_7 (integer)</td></tr>
				<tr><td>ABMON_1 (integer)</td></tr>
				<tr><td>ABMON_2 (integer)</td></tr>
				<tr><td>ABMON_3 (integer)</td></tr>
				<tr><td>ABMON_4 (integer)</td></tr>
				<tr><td>ABMON_5 (integer)</td></tr>
				<tr><td>ABMON_6 (integer)</td></tr>
				<tr><td>ABMON_7 (integer)</td></tr>
				<tr><td>ABMON_8 (integer)</td></tr>
				<tr><td>ABMON_9 (integer)</td></tr>
				<tr><td>ABMON_10 (integer)</td></tr>
				<tr><td>ABMON_11 (integer)</td></tr>
				<tr><td>ABMON_12 (integer)</td></tr>
				<tr><td>MON_1 (integer)</td></tr>
				<tr><td>MON_2 (integer)</td></tr>
				<tr><td>MON_3 (integer)</td></tr>
				<tr><td>MON_4 (integer)</td></tr>
				<tr><td>MON_5 (integer)</td></tr>
				<tr><td>MON_6 (integer)</td></tr>
				<tr><td>MON_7 (integer)</td></tr>
				<tr><td>MON_8 (integer)</td></tr>
				<tr><td>MON_9 (integer)</td></tr>
				<tr><td>MON_10 (integer)</td></tr>
				<tr><td>MON_11 (integer)</td></tr>
				<tr><td>MON_12 (integer)</td></tr>
				<tr><td>AM_STR (integer)</td></tr>
				<tr><td>PM_STR (integer)</td></tr>
				<tr><td>D_T_FMT (integer)</td></tr>
				<tr><td>D_FMT (integer)</td></tr>
				<tr><td>T_FMT (integer)</td></tr>
				<tr><td>T_FMT_AMPM (integer)</td></tr>
				<tr><td>ERA (integer)</td></tr>
				<tr><td>ERA_YEAR (integer)</td></tr>
				<tr><td>ERA_D_T_FMT (integer)</td></tr>
				<tr><td>ERA_D_FMT (integer)</td></tr>
				<tr><td>ERA_T_FMT (integer)</td></tr>
				<tr><td>ALT_DIGITS (integer)</td></tr>
				<tr><td>INT_CURR_SYMBOL (integer)</td></tr>
				<tr><td>CURRENCY_SYMBOL (integer)</td></tr>
				<tr><td>CRNCYSTR (integer)</td></tr>
				<tr><td>MON_DECIMAL_POINT (integer)</td></tr>
				<tr><td>MON_THOUSANDS_SEP (integer)</td></tr>
				<tr><td>MON_GROUPING (integer)</td></tr>
				<tr><td>POSITIVE_SIGN (integer)</td></tr>
				<tr><td>NEGATIVE_SIGN (integer)</td></tr>
				<tr><td>INT_FRAC_DIGITS (integer)</td></tr>
				<tr><td>FRAC_DIGITS (integer)</td></tr>
				<tr><td>P_CS_PRECEDES (integer)</td></tr>
				<tr><td>P_SEP_BY_SPACE (integer)</td></tr>
				<tr><td>N_CS_PRECEDES (integer)</td></tr>
				<tr><td>N_SEP_BY_SPACE (integer)</td></tr>
				<tr><td>P_SIGN_POSN (integer)</td></tr>
				<tr><td>N_SIGN_POSN (integer)</td></tr>
				<tr><td>DECIMAL_POINT (integer)</td></tr>
				<tr><td>RADIXCHAR (integer)</td></tr>
				<tr><td>THOUSANDS_SEP (integer)</td></tr>
				<tr><td>THOUSEP (integer)</td></tr>
				<tr><td>GROUPING (integer)</td></tr>
				<tr><td>YESEXPR (integer)</td></tr>
				<tr><td>NOEXPR (integer)</td></tr>
				<tr><td>YESSTR (integer)</td></tr>
				<tr><td>NOSTR (integer)</td></tr>
				<tr><td>CODESET (integer)</td></tr>
				<tr><td>LOG_EMERG (integer)</td></tr>
				<tr><td>LOG_ALERT (integer)</td></tr>
				<tr><td>LOG_CRIT (integer)</td></tr>
				<tr><td>LOG_ERR (integer)</td></tr>
				<tr><td>LOG_WARNING (integer)</td></tr>
				<tr><td>LOG_NOTICE (integer)</td></tr>
				<tr><td>LOG_INFO (integer)</td></tr>
				<tr><td>LOG_DEBUG (integer)</td></tr>
				<tr><td>LOG_KERN (integer)</td></tr>
				<tr><td>LOG_USER (integer)</td></tr>
				<tr><td>LOG_MAIL (integer)</td></tr>
				<tr><td>LOG_DAEMON (integer)</td></tr>
				<tr><td>LOG_AUTH (integer)</td></tr>
				<tr><td>LOG_SYSLOG (integer)</td></tr>
				<tr><td>LOG_LPR (integer)</td></tr>
				<tr><td>LOG_NEWS (integer)</td></tr>
				<tr><td>LOG_UUCP (integer)</td></tr>
				<tr><td>LOG_CRON (integer)</td></tr>
				<tr><td>LOG_AUTHPRIV (integer)</td></tr>
				<tr><td>LOG_LOCAL0 (integer)</td></tr>
				<tr><td>LOG_LOCAL1 (integer)</td></tr>
				<tr><td>LOG_LOCAL2 (integer)</td></tr>
				<tr><td>LOG_LOCAL3 (integer)</td></tr>
				<tr><td>LOG_LOCAL4 (integer)</td></tr>
				<tr><td>LOG_LOCAL5 (integer)</td></tr>
				<tr><td>LOG_LOCAL6 (integer)</td></tr>
				<tr><td>LOG_LOCAL7 (integer)</td></tr>
				<tr><td>LOG_PID (integer)</td></tr>
				<tr><td>LOG_CONS (integer)</td></tr>
				<tr><td>LOG_ODELAY (integer)</td></tr>
				<tr><td>LOG_NDELAY (integer)</td></tr>
				<tr><td>LOG_NOWAIT (integer)</td></tr>
				<tr><td>LOG_PERROR (integer)</td></tr>
			</tbody>
		</table>
	</div>
	<!-- END: CONSTANTS -->
	
	<!-- BEGIN: COMPARISONS -->
	<div class="phpfr-section" id="comparisons">
		<table>
			<caption>Comparison Operators</caption>
			<thead>
				<tr>
					<th>Example</th>
					<th>Name</th>
					<th>Result</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<th>$a == $b</th>
					<td>Equal</td>
					<td><span class="true">TRUE</span> if $a is equal to $b.</td>
				</tr>
				<tr>
					<th>$a === $b</th>
					<td>Identical</td>
					<td><span class="true">TRUE</span> if $a is equal to $b, and they are of the same type. (introduced in PHP 4)</td>
				</tr>
				<tr>
					<th>$a != $b</th>
					<td>Not equal</td>
					<td><span class="true">TRUE</span> if $a is not equal to $b.</td>
				</tr>
				<tr>
					<th>$a &lt;&gt; $b</th>
					<td>Not equal</td>
					<td><span class="true">TRUE</span> if $a is not equal to $b.</td>
				</tr>
				<tr>
					<th>$a !== $b</th>
					<td>Not identical</td>
					<td><span class="true">TRUE</span> if $a is not equal to $b, or they are not of the same type. (introduced in PHP 4)</td>
				</tr>
				<tr>
					<th>$a &lt; $b</th>
					<td>Less than</td>
					<td><span class="true">TRUE</span> if $a is strictly less than $b.</td>
				</tr>
				<tr>
					<th>$a &gt; $b</th>
					<td>Greater than</td>
					<td><span class="true">TRUE</span> if $a is strictly greater than $b.</td>
				</tr>
				<tr>
					<th>$a &lt;= $b</th>
					<td>Less than or equal to</td>
					<td><span class="true">TRUE</span> if $a is less than or equal to $b.</td>
				</tr>
				<tr>
					<th>$a &gt;= $b</th>
					<td>Greater than or equal to</td>
					<td><span class="true">TRUE</span> if $a is greater than or equal to $b.</td>
				</tr>
			</tbody>
		</table>
		<table>
			<caption>Comparisons with Various Types</caption>
			<thead>
				<tr>
					<th style="width: 25%;">Type of Operand 1</th>
					<th style="width: 25%;">Type of Operand 2</th>
					<th style="width: 50%;">Result</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>null or string</td>
					<td>string</td>
					<td>Convert NULL to "", numerical or lexical comparison</td>
				</tr>
				<tr>
					<td>bool or null</td>
					<td>anything</td>
					<td>Convert to bool, FALSE < TRUE</td>
				</tr>
				<tr>
					<td>object</td>
					<td>object</td>
					<td>Built-in classes can define its own comparison, different classes are uncomparable, same class - compare properties the same way as arrays (PHP 4), PHP 5 has its own explanation</td>
				</tr>
				<tr>
					<td>string, resource or<br>number</td>
					<td>string, resource or<br>number</td>
					<td>Translate strings and resources to numbers, usual math</td>
				</tr>
				<tr>
					<td>array</td>
					<td>array</td>
					<td>Array with fewer members is smaller, if key from operand 1 is not found in operand 2 then arrays are uncomparable, otherwise - compare value by value</td>
				</tr>
				<tr>
					<td>array</td>
					<td>anything</td>
					<td>array is always greater</td>
				</tr>
				<tr>
					<td>object</td>
					<td>anything</td>
					<td>object is always greater</td>
				</tr>
			</tbody>
		</table>
		<table>
			<caption>Comparisons of $x with PHP Functions</caption>
			<thead>
				<tr>
					<th>Expression</th>
					<th><span class="link" onclick="PHPFR.functions.show('gettype');">gettype()</span></th>
					<th><span class="link" onclick="PHPFR.functions.show('empty');">empty()</span></th>
					<th><span class="link" onclick="PHPFR.functions.show('is_null');">is_null()</span></th>
					<th><span class="link" onclick="PHPFR.functions.show('isset');">isset()</span></th>
					<th>boolean : if($x)</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<th>$x == "";</th>
					<td>string</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>$x == NULL;</th>
					<td>NULL</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>var $x;</th>
					<td>NULL</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>$x is undefined</th>
					<td>NULL</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>$x = <span class="link" onclick="PHPFR.functions.show('array');">array()</span>;</th>
					<td>array</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>$x = false;</th>
					<td>boolean</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>$x = true;</th>
					<td>boolean</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
				</tr>
				<tr>
					<th>$x = 1;</th>
					<td>integer</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
				</tr>
				<tr>
					<th>$x = 42;</th>
					<td>integer</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
				</tr>
				<tr>
					<th>$x = 0;</th>
					<td>integer</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>$x = -1;</th>
					<td>integer</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
				</tr>
				<tr>
					<th>$x = "1"</th>
					<td>string</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
				</tr>
				<tr>
					<th>$x = "0"</th>
					<td>string</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>$x = "-1"</th>
					<td>string</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
				</tr>
				<tr>
					<th>$x = "php"</th>
					<td>string</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
				</tr>
				<tr>
					<th>$x = "true"</th>
					<td>string</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
				</tr>
				<tr>
					<th>$x = "false"</th>
					<td>string</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
				</tr>
			</tbody>
		</table>
		<table>
			<caption>Loose comparisons with ==</caption>
			<thead>
				<tr>
					<th></th>
					<th>TRUE</th>
					<th>FALSE</th>
					<th>1</th>
					<th>0</th>
					<th>-1</th>
					<th>"1"</th>
					<th>"0"</th>
					<th>"-1"</th>
					<th>NULL</th>
					<th><span class="link" onclick="PHPFR.functions.show('array');">array()</span></th>
					<th>"PHP"</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<th>TRUE</th>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
				</tr>
				<tr>
					<th>FALSE</th>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>1</th>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>0</th>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
				</tr>
				<tr>
					<th>-1</th>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>"1"</th>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>"0"</th>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>"-1"</th>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>NULL</th>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th><span class="link" onclick="PHPFR.functions.show('array');">array()</span></th>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>"PHP"</th>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
				</tr>
			</tbody>
		</table>
		<table>
			<caption>Strict comparisons with ===</caption>
			<thead>
				<tr>
					<th></th>
					<th>TRUE</th>
					<th>FALSE</th>
					<th>1</th>
					<th>0</th>
					<th>-1</th>
					<th>"1"</th>
					<th>"0"</th>
					<th>"-1"</th>
					<th>NULL</th>
					<th><span class="link" onclick="PHPFR.functions.show('array');">array()</span></th>
					<th>"PHP"</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<th>TRUE</th>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>FALSE</th>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>1</th>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>0</th>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>-1</th>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>"1"</th>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>"0"</th>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>"-1"</th>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>NULL</th>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th><span class="link" onclick="PHPFR.functions.show('array');">array()</span></th>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
					<td class="false">FALSE</td>
				</tr>
				<tr>
					<th>"PHP"</th>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="false">FALSE</td>
					<td class="true">TRUE</td>
				</tr>
			</tbody>
		</table>
	</div>
	<!-- END: COMPARISONS -->
</div>

</body>
</html>